/**
 * Created by mengwei666 on 2016/10/2.
 */
import java.awt.Graphics;
import javax.swing.JPanel;
import javax.swing.JFrame;
public class exercise_2 extends JPanel{
    public void paintComponent(Graphics g){
        super.paintComponent(g);
        for(int i=0;i<12;i++){
            g.drawOval(getSize().width/2-5-5*i,getSize().height/2-5-5*i,10+10*i,10+10*i);
        }
    }
}
class Draw{
    public static void main(String[] args) {
        exercise_2 panel=new exercise_2();
        JFrame app=new JFrame();
        app.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        app.add(panel);
        app.setSize(400,400);
        app.setVisible(true);
    }
}